tools/libxc: send page-in requests in batches in linux_privcmd_map_foreign_bulk
authorOlaf Hering <olaf@aepfle.de>
Mon, 26 Mar 2012 13:22:18 +0000 (15:22 +0200)
committerOlaf Hering <olaf@aepfle.de>
Mon, 26 Mar 2012 13:22:18 +0000 (15:22 +0200)
commit98901586719af81409ffbd8ca0112a0685b360a6
tree667b0377c2ea224275b65ea4223158f21a421f66
parentcf3a68283ffa5c10982af8b59d1f1ec24d22589d
tools/libxc: send page-in requests in batches in linux_privcmd_map_foreign_bulk

One of the bottlenecks with foreign page-in request is the poor retry
handling in linux_privcmd_map_foreign_bulk(). It sends one request per
paged gfn at a time and it waits until the gfn is accessible. This
causes long delays in mmap requests from qemu-dm and xc_save.

Instead of sending one request at a time, walk the entire gfn list and
send batches of mmap requests. They will eventually end up in the pager's
request ring (if it has room again), and will fill up this ring so that
in turn the pager can also process page-in in batches.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/libxc/xc_linux_osdep.c